package com.googlecode.guicehibernate.repository;

import java.io.Serializable;
import java.util.List;

import org.hibernate.criterion.DetachedCriteria;


public interface Repository<T> {

    T save(T entity);

    T update(T entity);

    T saveOrUpdate(T entity);
    
    void delete(Object entity);
    
    T load(Class<? extends T> entityClass, Serializable id);
 
    List<T> loadAll(Class<? extends T> entityClass);
    
    List<T> find(DetachedCriteria criteria);
    
}
